package com.example.dance.mapper;

import com.example.dance.pojo.VideoPoint;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface VideoPointsMapper {
    @Insert("insert into dance.video_points(video_id, text, time) VALUE " +
            "(#{videoId},#{text},#{time})")
    int insertNewPoint(VideoPoint videoPoint);

    @Select("select text,time from dance.video_points where video_id=#{videoId}")
    List<VideoPoint> getVideoPoints(int videoId);
}
